<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Mystery</title>
<link rel="stylesheet" th:href="@{/easy/css/bootstrap.css}" />
<link rel="stylesheet" th:href="@{/icon/css/font-awesome.min.css}" />
</head>
<body class="bg-b">
	<div class="container-fluid" style="width: 100%; height: 100%">
		<div class="row">
			<div class="col text-center bg-primary text-white">邮箱内容</div>
		</div>
		<div class="card" style="width: 100%; height: 80%">
			<div class="card-header">
				<h4 style="color: black; font-weight: bold;"
					th:text="${map.msgInfo.title}"></h4>
				<div>
					发件人 : <span style="color: maroon; font-weight: bold;"
						th:text="${map.msgComm.senderAccount}"></span>
				</div>
				<div>
					时间 : &nbsp;<span style="color: maroon; font-weight: bold;"
						th:text="${#dates.format(map.msgComm.createtime,'yyyy 年  MM 月 dd 日 HH:mm:ss')}"></span>
				</div>
				<div>
					收件人 : <span style="color: maroon; font-weight: bold;"
						th:text="${map.msgComm.receiverAccount}"></span>
				</div>
			</div>
			<div class="card-body">
				<div th:text="${map.msgInfo.content}">正文</div>
			</div>
			<div class="card-footer">
				<div>
					<button class="btn btn-sm btn-info" onclick="reply()">回复</button>
					<button class="btn btn-sm btn-info ml-2" onclick="forwarding()">转发</button>
					<button class="btn btn-sm btn-danger ml-2" onclick="delMsg()">删除</button>
				</div>
			</div>
		</div>
	</div>
	<!-- js -->
	<script th:src="@{/easy/js/jquery.js}"></script>
	<script th:src="@{/easy/js/avalon.js}"></script>
	<script th:src="@{/page/jqpaginator.js}"></script>
	<script th:src="@{/layer/layer.js}"></script>
	<script th:inline="javascript">
		//--reply回复
		function reply(){
			var id = [[${map.msgInfo.id}]];
			location.href="/mona/MsgInfo/reply?id="+id;
		}
		//--forwarding转发
		function forwarding(){
			var id = [[${map.msgInfo.id}]];
			location.href="/mona/MsgInfo/forward?id="+id;
		}
	 	//--delete
	 	function delMsg(){
	 		var num = [[${map.msgComm.id}]];
			$.post("/mona/MsgInfo/delMail",{
				id : num
			},function(data){
				if(data=="success"){
					location.href="/mona/MsgInfo/toReceive";
				}
			});
		} 
	</script>
</body>
</html>